<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >  

    <!--    <h:body>-->
    <ui:composition template="layout.xhtml">
        <ui:define name="corpo"> 
            <h:form id="tipoend" acceptcharset="utf-8"> 
                <p:panel header="Cadastrar Tipo Endereço">
                      <p:messages id="msg"/>
                    <p:focus for="nome"/>
                    <fieldset>
                        <legend>Dados Tipo Endereco</legend>
                        <h:panelGrid columns="2"  border="0" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                            <h:outputLabel value="Nome: "/>
                            <p:inputText value="#{managerTipoEndereco.tipoend.nome}"
                                         id="nome"
                                         required="true" size="50" 
                                         requiredMessage="O campo nome deve ser preenchido "/>      
                            <h:outputLabel value="Descrição: "/>
                            <p:inputText value="#{managerTipoEndereco.tipoend.descricao}"
                                         id="descricao"
                                         required="true" size="50" 
                                         requiredMessage="O campo descricao deve ser preenchido "/>      
                        
                        </h:panelGrid>
                        <br/>
                    </fieldset>
                    <br/>    
                </p:panel>
                <br/>
                <center>
                    <p:commandButton id="submit" actionListener="#{managerTipoEndereco.editar()}" icon="ui-icon-disk" value="SALVAR" update="@form"/>
                </center> 
                <p:blockUI block="submit" trigger="submit">  
                    CARREGANDO...<br />  
                    <p:graphicImage value="/media/img/ajax-loader.gif"/>  
                </p:blockUI>

               
            </h:form>
        </ui:define>
    </ui:composition>

</html>